﻿// See https://aka.ms/new-console-template for more information



try
{   
    string str3 = "123b";
    /*long i2 = long.Parse(str3);
    Console.WriteLine(i2);*/
    string str4;

    #region do while
    /*do{
        Console.WriteLine("请用户输入一个数字:");
        str4= Console.ReadLine();
    }
    while(!int.TryParse(str4, out int result));
    long l = long.Parse(str4);
    Console.WriteLine("你输入的数字是:"+l);*/
    #endregion
    Console.WriteLine("请用户输入一个数字:");
    str4= Console.ReadLine();
    long l = long.Parse(str4);
    Console.WriteLine("你输入的数字是:"+l);
}
catch (Exception ex)
{
    Console.WriteLine(ex.Message);
    Console.WriteLine("输入有误!");
}
finally
{
    Console.WriteLine("Hello!finally");
}